﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ucBannerQuangCao : System.Web.UI.UserControl
{
    private int loaisanphamid;

    public int loaisanpham
    {
        get { return loaisanphamid; }
        set { loaisanphamid = value; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            LoadBannerQuangCao();
        }
    }

    private void LoadBannerQuangCao()
    {
        BannerQuangCaoDataSet bnDS = new BannerQuangCaoHelper().LoadBannerTheoLoai(loaisanphamid);
        repBanner.DataSource = bnDS;
        repBanner.DataBind();
    }
}